import request from '@/utils/request'

// 获取 BOM 列表
export function getBomList(params) {
  return request({
    url: '/api/BOM/GetList',
    method: 'get',
    params
  })
}

// 添加 BOM
export function addBom(data) {
  return request({
    url: '/api/BOM/Add',
    method: 'post',
    data
  })
}

// 更新 BOM
export function updateBom(data) {
  return request({
    url: '/api/BOM/Update',
    method: 'put',
    data
  })
}

// 删除 BOM
export function deleteBom(id) {
  return request({
    url: `/api/BOM/Delete/${id}`,
    method: 'delete'
  })
}

// 批量删除 BOM
export function batchDeleteBom(ids) {
  return request({
    url: '/api/BOM/BatchDelete',
    method: 'delete',
    data: ids
  })
}

// 导入 BOM
export function importBom(data) {
  return request({
    url: '/api/BOM/Import',
    method: 'post',
    data
  })
} 